$animationTime: .5s;
$animationType: linear;
$ratio: 375 / 10;

@mixin borderBox{
  box-sizing: border-box;
}


@function px2rem($px) {
  @return $px / $ratio + rem;
}

@mixin cover-no-repeat-center {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@mixin contain-no-repeat-center{
  @include no-repeat-center;
  background-size: contain;

}

@mixin no-repeat-center {
  background-position: center;
  background-repeat: no-repeat;
}

@mixin body-background-image{
  @include cover-no-repeat-center;
  width: 100vw;
  z-index: -1;
}

@mixin absCenter {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

@mixin center {
  display: flex;
  justify-content: center;
  align-items: center;
}

@mixin left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

@mixin top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

@mixin right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

@mixin columnTop {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

@mixin columnLeft {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

@mixin columnCenter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@mixin ellipsis {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

@mixin myEllipsis2{
  display: block;  /*设置为弹性盒子*/
  -webkit-line-clamp: 1;  /*最多显示x行*/
  overflow: hidden;  /*超出隐藏*/
  text-overflow: ellipsis;  /*超出显示为省略号*/
  -webkit-box-orient: vertical;
}

@mixin myEllipsis{
  display: -webkit-box;
  -webkit-line-clamp: 1;  /*最多显示x行*/
  overflow: hidden;  /*超出隐藏*/
  text-overflow: ellipsis;  /*超出显示为省略号*/
  -webkit-box-orient: vertical;
}

@mixin ellipsis2($line) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all; // 可在任意字符间断行。
}

@mixin ellipsis3($line) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all; // CJK 文本不断行
}


@mixin scroll {
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  &::-webkit-scrollbar {
    display: none;
  }
}

@mixin leftBottom {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

@mixin pseEle{
  content: '';
  position: absolute;
  width: 1px;
  height: 5vw;
  top: 50%;
  margin-top: -2.5vw;
  background-color: #dcdfe3;
}
